<extend name="Index/index" />
<block name="nav1">
    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="#">Admin</a>
        </li>
        <li class="active">商品图片管理</li>
    </ul><!-- .breadcrumb -->
</block>

<block name="nav2">
    <div class="page-content">
<div class="page-header">
    <h1>
        商品
        <small>
            <i class="icon-double-angle-right"></i>
            图片管理
        </small>
    </h1>
</div><!-- /.page-header -->

<form class="form-horizontal" role="form" action="<{:U('upload')}>" method="post" enctype="multipart/form-data">   
    <input type="hidden" name="gid" value="<{$gid}>">
    <input type="file" name="icon" />
    <input type="submit" value="上传图片" />
</form>
<form action="<{:U('Goods/index')}>" method="post">
        <input type="submit" value="返回商品列表">
</form>
<div class="row">
    <div class="col-xs-12">
        <table class="table">
 		<tr>
 			<th>图片编号</th>
 			<th>商品编号</th>
 			<th>图片名</th>
 			<th>封面</th>
 			<th>操作</th>
 		</tr>
  
 		<foreach name="list" item="v">
 			<tr>
 				<td><{$v.id}></td>
 				<td><{$v.gid}></td>
 				<td><img src="__UPLOAD__/<{$v.icon}>"></td>
                <td>
                	<if condition="$v.face eq '1'">
                        <a href="<{:U('face',array('id'=>$v['id'],'s'=>1,'gid'=>$v['gid']))}>">封面</a>
                    <else/>
                        <a href="<{:U('face',array('id'=>$v['id'],'s'=>2,'gid'=>$v['gid']))}>">非封面</a>
                    </if>
                </td>
                <td>
                	<a href="<{:U('delimg',array('id'=>$v['id']))}>" class="btn btn-danger">删除</a>
                </td>
 			</tr>
 		</foreach>
 	</table>
    </div>
</div>     

</block>
<block name="myjs">
    <script>
        
    </script>
</block>




